<template>
  <p class="px-4 py-2 relative overflow-hidden shadow">
        <div class=" flex justify-between items-center">
        <h3 class="flex-1">问大家</h3>

         <wx-launch
            class="relative w-20 h-10 top-2"
            :path='miniPath'
            >
            <span class="absolute top-0 right-0"
                :class="isWx ? 'pointer-events-none' : ''"
                    @click="$openApp"
                >
                <button class="text-sm text-gray-600" 
                    >查看全部</button>
                <van-icon name="arrow" />
            </span>
        </wx-launch>
      
        </div>

        <ul class="">
            <li 
            v-for="item in all" :key="item.id"
            class="flex items-center"
            >
                <i class="iconfont icon-ask text-yellow-600 !text-3xl"></i>
                <span class="flex-1 text-gray-700">{{item.content}}</span>
                <span class="text-sm text-gray-600"
                    @click="$openApp"
                >{{item.answers_count}}个回答</span>
            </li>
        </ul>
    </p>
</template>

<script>
import wxLaunch from '../../components/wxLaunch.vue'

export default {
  props: ['all'],
  inject: ['isWx'],
  components: { wxLaunch },

  computed: {
    // one() {
    //     return this.all.splice(0,1);
    // }
  },
  methods: {},
}
</script>

<style>
</style>